<%-- 
    Document   : homeAdmin
    Created on : 12/08/2013, 09:54:07
    Author     : Thiago
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <title>SorriDent - O seu consultório odontológico em Florianópolis</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <!-- Bootstrap -->
        <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
        <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
        <link href="/Consultorio/css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link href="/Consultorio/css/estilo.css" rel="stylesheet" media="screen">
        <link href="/Consultorio/css/bootstrap-glyphicons.css" rel="stylesheet" media="screen">
        <!-- JavaScript plugins (requires jQuery) -->
        <script src="http://code.jquery.com/jquery.js"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="/Consultorio/js/bootstrap.min.js"></script>

        <!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
        <script src="/Consultorio/js/respond.js"></script>
    </head>
    <body>
        <div class="container">
            <div id="header">
                <div class="navbar navbar-static-top navCon" style="float:left">
                    <a class="navbar-brand corTexto" href="#">SorriDent</a>
                    <ul class="nav navbar-nav">
                        <li class="bordaNav"><a href="/Consultorio/admin/perfilAdmin.jsp">Perfil</a></li>
                        <li><a href="/Consultorio/admin/consultaAdmin.jsp">Consultas</a></li>
                        <li><a href="/Consultorio/admin/agenda.jsp">Agenda</a></li>
                        <li><a href="/Consultorio/admin/examesAdmin.jsp">Exames</a></li>
                    </ul>
                </div>
                <div id="login">
                    <form method="POST" action="/Consultorio/ServletUsuario?cmd=sair">
                    <span class="input-group">Seja bem vindo(a)</span> <input class="btn btn-default" value="Sair" type="submit" style="padding: 0; width: 40px; float:right; margin-right: 35px; font-size: 12px; color:#428bca;" /> 
                    </form>
                </div>
            </div>   
        </div>
        <div class="container" style="margin-top: 40px">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title" style="float:left; font-weight: bolder; font-size: 18px; margin-top: 2px"><a href="/Consultorio/perfilAdmin.jsp" style="text-decoration:none">Perfil</a></h3>
                    <li class="dropdown tituloPainel">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="/Consultorio/admin/pesqPaciente.jsp">
                            Pacientes <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li ><a href="/Consultorio/ServletPaciente?cmd=combo">Cadastrar</a></li>
                            <li ><a href="/Consultorio/admin/pesqPaciente.jsp">Pesquisar</a></li>
                        </ul>
                    </li>
                    <li class="dropdown tituloPainel">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="/Consultorio/admin/pesqFuncionario.jsp">
                            Funcionários <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li ><a href="/Consultorio/ServletFuncionario?cmd=combo">Cadastrar</a></li>
                            <li ><a href="/Consultorio/admin/pesqFuncionario.jsp">Pesquisar</a></li>
                        </ul>
                    </li>
                    <li class="dropdown tituloPainel">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="/Consultorio/admin/pesqConvenio.jsp">
                            Convênios <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li ><a href="/Consultorio/admin/cadConvenio.jsp">Cadastrar</a></li>
                            <li ><a href="/Consultorio/admin/pesqConvenio.jsp">Pesquisar</a></li>
                        </ul>
                    </li>
                    <h3 class="tituloPainel"><a href="#">Estatísticas</a></h3>
                </div>
                <div class="conteudo_admin">
                    <form action="/Consultorio/ServletFuncionario?cmd=pFuncionarioNome" method="POST">
                        <div class="input-group" style="width: 700px">
                            <input type="text" class="form-control" name="nome" placeholder="Pesquise pelo nome do funcionário">
                            <span class="input-group-btn"">
                                <input class="btn btn-default" value="Pesquisar" type="submit">
                            </span>
                        </div>
                    </form>
                </div>
                <div class="container" style="margin-top: 30px">
                    <table class="table table-hover">
                        <thead>
                            <tr>
                                <th>#</th>
                                <th>Nome</th>
                                <th>Telefone</th>
                                <th>E-mail</th>
                                <th>Função</th>
                                <th>Data Nascimento</th>
                                <th>Salário</th>
                                <th>Alterar/Excluir</th>
                            </tr>
                        </thead>
                        <c:if test="${!empty funcionarios}">
                            <tbody id="corpoTabela">
                                    <c:forEach var="func" items="${funcionarios}">
                                <tr>
                                        <th>${func.id}</th>
                                        <th>${func.nome}</th>
                                        <th>${func.telefone}</th>
                                        <th>${func.email}</th>
                                        <c:forEach var="funcoes" items="${funcoes}">
                                            <th>${funcoes.nome}</th>
                                        </c:forEach>
                                        <th>${func.dataNasc}</th>
                                        <th>R$ ${func.salario}</th>
                                        <th><a href="ServletFuncionario?cmd=pFuncionario&id=${func.id}" style="padding:10px"><i class="glyphicon glyphicon-wrench"></i>Alterar</a><a href="ServletFuncionario?cmd=excluir&id=${func.id}" onclick="return confirm('Tem certeza que deseja excluir?')" style="padding:10px; color:red"><i class="glyphicon glyphicon-remove-circle"></i>Excluir</a></th>
                                </tr>
                                    </c:forEach>
                            </tbody>
                        </c:if>
                    </table>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
